home *** CD-ROM | disk | FTP | other *** search
/ Transactor / Transactor_22_1988_Transactor_Publishing.d64 / read infocom (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  1KB  |  39 lines

  1. 10 rem   read infocom
  2. 15 rem   1/3/87
  3. 20 rem   thomas w. gurley
  4. 25 rem   p.o. box 133
  5. 30 rem   wills point, texas, 75169
  6. 35 :
  7. 40 :
  8. 100 poke55,0:poke56,42:clr:rem lower top of basic
  9. 110 aa=0:ab=0:ac=0:ad=0:m=0:n=0:o=0:nx=0:nn=0:diml(6):rem define variables
  10. 120 print"              read infocom"
  11. 130 print"start ";: input"address";nx
  12. 140 print"increment  1     2": inputnn: ifnn<1ornn>2then140
  13. 150 ifnx=0thennx=10816:rem start of short quick search word list
  14. 160 ifpeek(197)=4thenprint"address is "nx: goto130:rem change address with f1
  15. 170 aa=peek(nx):ab=peek(nx+1):ac=peek(nx+2):ad=peek(nx+3)
  16. 180 m=0:n=0:o=0
  17. 190 rem   95 94 97 96                             aa ab ac ad
  18. 200 l(1)=int((aa-20)/4)+64:rem the '+64' and '+59' restore alphabet position
  19. 210 l(3)=(ab and 31)+59:rem 'and 31' drops top three bits
  20. 220 m=int((ab and 240)/32)+59:rem 'and 240' takes top bits only
  21. 230 if(aa and 1)=1 then n=8:rem restore carry on second 'rol'
  22. 240 if(aa and 2)=2 then o=16:rem restore carry on first 'rol'
  23. 250 l(2)=m+n+o:rem add carries back in
  24. 260 rem second half
  25. 270 m=0:n=0:o=0:rem cancel carries
  26. 280 l(4)=int((ac-20)/4)+64
  27. 290 l(6)=(ad and 31)+59
  28. 300 m=int((ad and 240)/32)+59
  29. 310 if(ac and 1)=1 then n=8
  30. 320 if)ac and 2)=2 then o=16
  31. 330 l(5)=m+n+0
  32. 340 print:print nx
  33. 350 forx=1to6:a=l(x) and 223:ifa<65ora>90thena=46:rem '.' = invalid character
  34. 360 rem the 'and' 223 clears bit 5 to make lower case character
  35. 370 l(x)=a:next
  36. 380 forx=1to6:printchr$(l(x));:next:print
  37. 390 ifpeek(654)=1then390:rem hold with shift lock
  38. 400 nx=nx+nn:goto160
  39.